package com.resource.collect.controller;

import com.alibaba.fastjson2.JSONArray;
import com.resource.collect.common.Result;
import com.resource.collect.util.PythonUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("game")
@RestController
public class GameController {

    @RequestMapping("search")
    public Result search(String query){
        JSONArray data = PythonUtil.exec("game.py", new String[]{query});
        return Result.success(data);
    }
}
